import 'package:flutter/material.dart';

class UiTag extends StatelessWidget {
  const UiTag({
    super.key,
    this.radius = 5,
    this.padding = const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
    this.backgroundColor,
    this.children = const [],
  });
  final double radius;
  final EdgeInsetsGeometry padding;
  final Color? backgroundColor;
  final List<Widget> children;
  @override
  Widget build(BuildContext context) {
    return IntrinsicWidth(
      child: Container(
        padding: padding,
        decoration: BoxDecoration(
          color: backgroundColor ?? Colors.grey.withOpacity(0.15),
          borderRadius: BorderRadius.circular(radius),
        ),
        child: Row(
          mainAxisSize: MainAxisSize.min,
          children: children,
        ),
      ),
    );
  }
}
